package com.yuhs.zixing.study.design.pattern.dp002.structural.s002.bridge.b002;

/**
 * @description:
 * @author: yuhs
 * @date: 2022/5/1 6:08 PM
 */
public class Client002 {
    public static void main(String[] args) {
        House002 house = new House002();
        System.out.println("-------房地产公司是这样运行的-------");
        //先找到房地产公司
        HouseCorp002 houseCorp = new HouseCorp002(house);
        //看我怎么挣钱
        houseCorp.makeMoney();
        System.out.println("\n");
        //山寨公司生产的产品很多，不过我只要指定产品就成了
        System.out.println("-------山寨公司是这样运行的-------");
        ShanZhaiCorp002 shanZhaiCorp = new ShanZhaiCorp002(new IPad002());
        shanZhaiCorp.makeMoney();
        //山寨公司生产的产品很多，不过我只要指定产品就成了
        System.out.println("-------山寨公司是这样运行的-------");
        shanZhaiCorp = new ShanZhaiCorp002(new Clothes002());
        shanZhaiCorp.makeMoney();
    }
}
